package com.opal.modules.costReportForm.service;

import com.opal.domain.R;
import com.opal.domain.ReturnMessageData;
import com.opal.model.DataGridData;
import com.opal.modules.costReportForm.entity.*;
import com.opal.modules.costReportForm.entity.table.CostBh;
import com.opal.modules.costReportForm.entity.table.CostBhLayuiTable;
import com.opal.modules.costReportForm.entity.table.CostReportInitialInfo;
import com.opal.utils.ResultMsg;
import com.opal.vo.GrfTableVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface CostReportFormService {

    /**
     * 使用easypoi导出至excel表中
     * @param request
     * @param response
     */
    void exportCostReportToExcelService(String costReportId, HttpServletRequest request, HttpServletResponse response);

    //根据成本单据号查询获取CostReport
    CostReport getCostReport(String costReportId);

    //A水料标准工时
    List<CostReportInitialInfoEayui> selectAll(int type, String typeName, String num, String pkOrg);

    //A水料标准工时(layui)
    List<CostReportInitialInfoLayui> selectAll2(int type);

    ResultMsg updataCostReport(CostReport costReport);

    //新增修改-水料价
    ReturnMessageData costReportUpdate(List<CostReportA> costReportA, String costReportId);

    //查询数据-水料价
    ReturnMessageData costReportASelect(String costReportId);

    //删除-水料价
    Map costReportADetele(Integer id);

    //删除-人工费
    Map costReportBDetele(Integer id);

    //新增修改-B人工费
    ReturnMessageData costReportBUpdate(List<CostReportB> costReportB, String costReportId);

    //新增修改-C配件费
    ReturnMessageData costReportCUpdate(List<CostReportC> costReportC, String costReportId);

    //删除-配件费
    Map costReportCDetele(Integer id);

    //获取grf模板数据
    GrfTableVO<Map> getCostReportGrf(String banben) throws IllegalAccessException;

    //获取ABC信息
    GrfTableVO<Map> getCostReportABC(String banben, String copy);

    //使用客户id查名字
    String selectName(String code);

    //生成版本号
    String createGetcostReportId();

    /**
     * 获取工时单价
     * @param costBh
     * @return
     */
    CostBhLayuiTable selectTimePriceService(CostBh costBh);

    /**
     * 添加工时单价
     * @param costBh
     * @return
     */
    Object addTimePriceService(CostBh costBh);

    /**
     * 修改工时单价
     * @param costBh
     * @return
     */
    Object modifyTimePriceService(CostBh costBh);

    Object costPswhAddService(CostReportInitialInfo costReportInitialInfo);

    Object costPswhDelService(Integer id);

    Object costPswhUpdateService(CostReportInitialInfo costReportInitialInfo);

    /**
     * 单价工时
     * @return
     */
    Object getPriceHoursService();

    /**
     * c 其他配件模糊查询
     * @return
     */
    Object selectSystemMountingsService(String name, DataGridData<String> rows);

    /**
     * 获取币种
     * @return
     */
    Object getCurrencyService(String code);

    /**
     * 水料价根据配方号获取价格
     * @return
     */
    Object selectArticlePrice(String peiFangHao);

    /**
     * 根据成本编码查询相关的配件、规格、等
     * @param costCoding
     * @return
     */
    Object selectCostCodingItemService(String costCoding, String pkOrg);

    CostReport selectByPrimaryKeyService(String costReportId);

    Object getCostPkOrgService(String pkOrg);

    /**
     * 生成版本号（部门简写）
     * @return
     */
    String getDeptNano();

    Object getCalculateOtherChargesZtTableDataService(String costReportId);
}